cc.Class({
    extends: cc.Component,

    properties: {
        username:{
            default:null,
            type:cc.Label
        },
        message: {
            default: null,
            type: cc.Label
        },
        showid: {
            default: null,
            type: cc.Label
        },
        logo: {
            default: null,
            type: cc.Sprite
        }
    },

    onLoad: function () {
        
    },
    init:function(obj){
        this.username.string = obj.username;
        this.message.string = obj.ip;
        this.showid.string = obj.id;
        var remoteUrl = obj.logo;
        let self = this;
        if(remoteUrl){
            cc.loader.load({url: remoteUrl, type: 'png'}, function (err,tex) {
                var spriteFrame = new cc.SpriteFrame(tex, cc.Rect(0, 0, 132, 132));
                self.logo.spriteFrame = spriteFrame;
            });
        }
    }
});